home *** CD-ROM | disk | FTP | other *** search
/ Programming a Multiplayer FPS in DirectX / Programming a Multiplayer FPS in DirectX (Companion CD).iso / DirectX / dxsdk_oct2004.exe / dxsdk.exe / Utilities / MView / gxu / npatchoutline.cod < prev    next >
Encoding:
Text File  |  2004-09-30  |  54.5 KB  |  1,842 lines

  1. ; Listing generated by Microsoft (R) Optimizing Compiler Version 13.10.4035 
  2.  
  3.     TITLE    .\npatchoutline.cpp
  4.     .386P
  5. include listing.inc
  6. if @Version gt 510
  7. .model FLAT
  8. else
  9. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  10. _TEXT    ENDS
  11. _DATA    SEGMENT DWORD USE32 PUBLIC 'DATA'
  12. _DATA    ENDS
  13. CONST    SEGMENT DWORD USE32 PUBLIC 'CONST'
  14. CONST    ENDS
  15. _BSS    SEGMENT DWORD USE32 PUBLIC 'BSS'
  16. _BSS    ENDS
  17. $$SYMBOLS    SEGMENT BYTE USE32 'DEBSYM'
  18. $$SYMBOLS    ENDS
  19. _TLS    SEGMENT DWORD USE32 PUBLIC 'TLS'
  20. _TLS    ENDS
  21. ;    COMDAT ??0CNPatchOutline@@QAE@XZ
  22. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  23. _TEXT    ENDS
  24. ;    COMDAT ??1CNPatchOutline@@QAE@XZ
  25. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  26. _TEXT    ENDS
  27. ;    COMDAT ?CalculateCounts@@YAXKPAK@Z
  28. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  29. _TEXT    ENDS
  30. ;    COMDAT ?Init@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z
  31. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  32. _TEXT    ENDS
  33. ;    COMDAT ?DrawInternal@CNPatchOutline@@AAEJPAUID3DXBaseMesh@@KKK@Z
  34. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  35. _TEXT    ENDS
  36. ;    COMDAT ?Draw@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z
  37. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  38. _TEXT    ENDS
  39. ;    COMDAT ?DrawFace@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@KK@Z
  40. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  41. _TEXT    ENDS
  42. ;    COMDAT ?CreateEmptyOutline@CNPatchOutline@@QAEJXZ
  43. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  44. _TEXT    ENDS
  45. ;    COMDAT ??$AddOutlineLineSegments@G@@YAXPAGK0@Z
  46. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  47. _TEXT    ENDS
  48. ;    COMDAT ??$AddOutlineLineSegments@I@@YAXPAIK0@Z
  49. _TEXT    SEGMENT PARA USE32 PUBLIC 'CODE'
  50. _TEXT    ENDS
  51. FLAT    GROUP _DATA, CONST, _BSS
  52.     ASSUME    CS: FLAT, DS: FLAT, SS: FLAT
  53. endif
  54.  
  55. INCLUDELIB LIBC
  56. INCLUDELIB OLDNAMES
  57.  
  58. PUBLIC    ??0CNPatchOutline@@QAE@XZ            ; CNPatchOutline::CNPatchOutline
  59. ; Function compile flags: /Ogs
  60. ; File d:\builds\nt32_fre\multimedia\directx\dxsdk\src\mview\gxu\npatchoutline.cpp
  61. ;    COMDAT ??0CNPatchOutline@@QAE@XZ
  62. _TEXT    SEGMENT
  63. ??0CNPatchOutline@@QAE@XZ PROC NEAR            ; CNPatchOutline::CNPatchOutline, COMDAT
  64. ; _this$ = ecx
  65.  
  66. ; 31   : {
  67.  
  68.   00000    8b c1         mov     eax, ecx
  69.   00002    33 c9         xor     ecx, ecx
  70.   00004    89 08         mov     DWORD PTR [eax], ecx
  71.   00006    89 48 04     mov     DWORD PTR [eax+4], ecx
  72.   00009    89 48 08     mov     DWORD PTR [eax+8], ecx
  73.   0000c    89 88 1c 02 00
  74.     00         mov     DWORD PTR [eax+540], ecx
  75.   00012    89 88 20 02 00
  76.     00         mov     DWORD PTR [eax+544], ecx
  77.   00018    89 88 24 02 00
  78.     00         mov     DWORD PTR [eax+548], ecx
  79.  
  80. ; 32   : }
  81.  
  82.   0001e    c3         ret     0
  83. ??0CNPatchOutline@@QAE@XZ ENDP                ; CNPatchOutline::CNPatchOutline
  84. _TEXT    ENDS
  85. PUBLIC    ??1CNPatchOutline@@QAE@XZ            ; CNPatchOutline::~CNPatchOutline
  86. EXTRN    ??3@YAXPAX@Z:NEAR                ; operator delete
  87. ; Function compile flags: /Ogs
  88. ;    COMDAT ??1CNPatchOutline@@QAE@XZ
  89. _TEXT    SEGMENT
  90. ??1CNPatchOutline@@QAE@XZ PROC NEAR            ; CNPatchOutline::~CNPatchOutline, COMDAT
  91. ; _this$ = ecx
  92.  
  93. ; 41   : }
  94.  
  95.   00000    8b ff         npad     2
  96.   00002    56         push     esi
  97.  
  98. ; 35   : {
  99.  
  100.   00003    8b f1         mov     esi, ecx
  101.  
  102. ; 36   :     GXRELEASE(m_pIndexBuffer);
  103.  
  104.   00005    8b 46 04     mov     eax, DWORD PTR [esi+4]
  105.   00008    85 c0         test     eax, eax
  106.   0000a    74 0a         je     SHORT $L56253
  107.   0000c    8b 08         mov     ecx, DWORD PTR [eax]
  108.   0000e    50         push     eax
  109.   0000f    ff 51 08     call     DWORD PTR [ecx+8]
  110.   00012    83 66 04 00     and     DWORD PTR [esi+4], 0
  111. $L56253:
  112.  
  113. ; 37   :     GXRELEASE(m_pDevice);
  114.  
  115.   00016    8b 06         mov     eax, DWORD PTR [esi]
  116.   00018    85 c0         test     eax, eax
  117.   0001a    74 09         je     SHORT $L56257
  118.   0001c    8b 08         mov     ecx, DWORD PTR [eax]
  119.   0001e    50         push     eax
  120.   0001f    ff 51 08     call     DWORD PTR [ecx+8]
  121.   00022    83 26 00     and     DWORD PTR [esi], 0
  122. $L56257:
  123.  
  124. ; 38   :     GXRELEASE(m_pDeclObj);
  125.  
  126.   00025    8b 46 08     mov     eax, DWORD PTR [esi+8]
  127.   00028    85 c0         test     eax, eax
  128.   0002a    74 0a         je     SHORT $L56261
  129.   0002c    8b 08         mov     ecx, DWORD PTR [eax]
  130.   0002e    50         push     eax
  131.   0002f    ff 51 08     call     DWORD PTR [ecx+8]
  132.   00032    83 66 08 00     and     DWORD PTR [esi+8], 0
  133. $L56261:
  134.  
  135. ; 39   : 
  136. ; 40   :     delete []m_rgaeAttributeTable;
  137.  
  138.   00036    ff b6 1c 02 00
  139.     00         push     DWORD PTR [esi+540]
  140.   0003c    e8 00 00 00 00     call     ??3@YAXPAX@Z        ; operator delete
  141.   00041    59         pop     ecx
  142.   00042    5e         pop     esi
  143.  
  144. ; 41   : }
  145.  
  146.   00043    c3         ret     0
  147. ??1CNPatchOutline@@QAE@XZ ENDP                ; CNPatchOutline::~CNPatchOutline
  148. ; Function compile flags: /Ogs
  149. _TEXT    ENDS
  150. ;    COMDAT ?CalculateCounts@@YAXKPAK@Z
  151. _TEXT    SEGMENT
  152. _pcFaces$ = 8                        ; size = 4
  153. ?CalculateCounts@@YAXKPAK@Z PROC NEAR            ; CalculateCounts, COMDAT
  154. ; _cSegments$ = eax
  155.  
  156. ; 69   : }
  157.  
  158.   00000    8b ff         npad     2
  159.  
  160. ; 53   : {
  161.  
  162.   00002    55         push     ebp
  163.   00003    8b ec         mov     ebp, esp
  164.  
  165. ; 54   :     DWORD iLevel;
  166. ; 55   :     DWORD cFacesPrev;
  167. ; 56   :     DWORD cFacesOut;
  168. ; 57   : 
  169. ; 58   : 
  170. ; 59   :     // UNDONE - should be a convenient formula to figure this one out
  171. ; 60   :     cFacesOut = 1;
  172.  
  173.   00005    33 c9         xor     ecx, ecx
  174.   00007    41         inc     ecx
  175.  
  176. ; 61   :     cFacesPrev = 1;
  177.  
  178.   00008    8b d1         mov     edx, ecx
  179.   0000a    eb 04         jmp     SHORT $L56503
  180. $L56272:
  181.  
  182. ; 63   :     {
  183. ; 64   :         cFacesPrev += 2;
  184.  
  185.   0000c    42         inc     edx
  186.   0000d    42         inc     edx
  187.  
  188. ; 65   :         cFacesOut += cFacesPrev;
  189.  
  190.   0000e    03 ca         add     ecx, edx
  191. $L56503:
  192.  
  193. ; 62   :     for (iLevel = 0; iLevel < cSegments-1; iLevel++)
  194.  
  195.   00010    48         dec     eax
  196.   00011    75 f9         jne     SHORT $L56272
  197.  
  198. ; 66   :     }
  199. ; 67   : 
  200. ; 68   :     *pcFaces = cFacesOut;
  201.  
  202.   00013    8b 45 08     mov     eax, DWORD PTR _pcFaces$[ebp]
  203.   00016    89 08         mov     DWORD PTR [eax], ecx
  204.  
  205. ; 69   : }
  206.  
  207.   00018    5d         pop     ebp
  208.   00019    c3         ret     0
  209. ?CalculateCounts@@YAXKPAK@Z ENDP            ; CalculateCounts
  210. _TEXT    ENDS
  211. PUBLIC    ?DrawInternal@CNPatchOutline@@AAEJPAUID3DXBaseMesh@@KKK@Z ; CNPatchOutline::DrawInternal
  212. EXTRN    __alloca_probe:NEAR
  213. ; Function compile flags: /Ogs
  214. ;    COMDAT ?DrawInternal@CNPatchOutline@@AAEJPAUID3DXBaseMesh@@KKK@Z
  215. _TEXT    SEGMENT
  216. _iLineEnd$ = -12                    ; size = 4
  217. _pbPoints$ = -8                        ; size = 4
  218. _pdwLineIndices$ = -4                    ; size = 4
  219. _ptmDrawMesh$ = 8                    ; size = 4
  220. _pbLine$ = 12                        ; size = 4
  221. _iAttrib$ = 12                        ; size = 4
  222. _pVertexBuffer$ = 16                    ; size = 4
  223. _iStartIndex$ = 16                    ; size = 4
  224. _iLine$ = 20                        ; size = 4
  225. _cLines$ = 20                        ; size = 4
  226. ?DrawInternal@CNPatchOutline@@AAEJPAUID3DXBaseMesh@@KKK@Z PROC NEAR ; CNPatchOutline::DrawInternal, COMDAT
  227. ; _this$ = ecx
  228.  
  229. ; 377  : }
  230.  
  231.   00000    8b ff         npad     2
  232.  
  233. ; 289  : {
  234.  
  235.   00002    55         push     ebp
  236.   00003    8b ec         mov     ebp, esp
  237.   00005    83 ec 0c     sub     esp, 12            ; 0000000cH
  238.  
  239. ; 290  :     HRESULT hr;
  240. ; 291  :     LPDIRECT3DVERTEXBUFFER9 pVertexBuffer;
  241. ; 292  :     DWORD cBytesPerVertex;
  242. ; 293  :     DWORD dwFVF;
  243. ; 294  :     DWORD iSubset;
  244. ; 295  : 
  245. ; 296  :     DWORD *pdwLineIndices;
  246. ; 297  :     PBYTE pbLine;
  247. ; 298  :     PBYTE pbPoints;
  248. ; 299  :     DWORD iLine;
  249. ; 300  :     DWORD iLineStart;
  250. ; 301  :     DWORD iLineEnd;
  251. ; 302  : 
  252. ; 303  :     if ((iAttrib < m_caeAttributeTable) && (m_rgaeAttributeTable[iAttrib].AttribId == iAttrib))
  253.  
  254.   00008    8b 45 0c     mov     eax, DWORD PTR _iAttrib$[ebp]
  255.   0000b    53         push     ebx
  256.   0000c    8b d9         mov     ebx, ecx
  257.   0000e    8b 8b 20 02 00
  258.     00         mov     ecx, DWORD PTR [ebx+544]
  259.   00014    3b c1         cmp     eax, ecx
  260.   00016    56         push     esi
  261.   00017    57         push     edi
  262.   00018    73 12         jae     SHORT $L56386
  263.   0001a    8b b3 1c 02 00
  264.     00         mov     esi, DWORD PTR [ebx+540]
  265.   00020    8d 14 80     lea     edx, DWORD PTR [eax+eax*4]
  266.   00023    39 04 96     cmp     DWORD PTR [esi+edx*4], eax
  267.   00026    75 04         jne     SHORT $L56386
  268.  
  269. ; 304  :     {
  270. ; 305  :         iSubset = iAttrib;
  271.  
  272.   00028    8b f0         mov     esi, eax
  273.  
  274. ; 306  :     }
  275. ; 307  :     else
  276.  
  277.   0002a    eb 18         jmp     SHORT $L56507
  278. $L56386:
  279.  
  280. ; 308  :     {
  281. ; 309  :         // look for the correct attribute table entry to draw
  282. ; 310  :         for (iSubset = 0; iSubset < m_caeAttributeTable; iSubset++)
  283.  
  284.   0002c    33 f6         xor     esi, esi
  285.   0002e    85 c9         test     ecx, ecx
  286.   00030    76 12         jbe     SHORT $L56507
  287.   00032    8b 93 1c 02 00
  288.     00         mov     edx, DWORD PTR [ebx+540]
  289. $L56388:
  290.  
  291. ; 311  :         {
  292. ; 312  :             if (m_rgaeAttributeTable[iSubset].AttribId == iAttrib)
  293.  
  294.   00038    39 02         cmp     DWORD PTR [edx], eax
  295.   0003a    74 08         je     SHORT $L56507
  296.   0003c    46         inc     esi
  297.   0003d    83 c2 14     add     edx, 20            ; 00000014H
  298.   00040    3b f1         cmp     esi, ecx
  299.   00042    72 f4         jb     SHORT $L56388
  300. $L56507:
  301.  
  302. ; 313  :             {
  303. ; 314  :                 break;
  304. ; 315  :             }
  305. ; 316  :         }
  306. ; 317  :     }
  307. ; 318  : 
  308. ; 319  :     if (iSubset < m_caeAttributeTable)
  309.  
  310.   00044    3b f1         cmp     esi, ecx
  311.   00046    0f 83 b4 01 00
  312.     00         jae     $L56403
  313.  
  314. ; 320  :     {
  315. ; 321  :         if ((iStartIndex == UNUSED32) || (cLines == UNUSED32))
  316.  
  317.   0004c    8b 7d 10     mov     edi, DWORD PTR _iStartIndex$[ebp]
  318.   0004f    83 ff ff     cmp     edi, -1
  319.   00052    74 06         je     SHORT $L56394
  320.   00054    83 7d 14 ff     cmp     DWORD PTR _cLines$[ebp], -1
  321.   00058    75 15         jne     SHORT $L56393
  322. $L56394:
  323.  
  324. ; 322  :         {
  325. ; 323  :             iStartIndex = m_rgaeAttributeTable[iSubset].FaceStart;
  326.  
  327.   0005a    8b 8b 1c 02 00
  328.     00         mov     ecx, DWORD PTR [ebx+540]
  329.   00060    8d 04 b6     lea     eax, DWORD PTR [esi+esi*4]
  330.   00063    8d 04 81     lea     eax, DWORD PTR [ecx+eax*4]
  331.   00066    8b 78 04     mov     edi, DWORD PTR [eax+4]
  332.  
  333. ; 324  :             cLines = m_rgaeAttributeTable[iSubset].FaceCount;
  334.  
  335.   00069    8b 40 08     mov     eax, DWORD PTR [eax+8]
  336.   0006c    89 45 14     mov     DWORD PTR _cLines$[ebp], eax
  337. $L56393:
  338.  
  339. ; 325  :         }
  340. ; 326  : 
  341. ; 327  :         if (m_rgaeAttributeTable[iSubset].FaceCount > 0)
  342.  
  343.   0006f    8b 83 1c 02 00
  344.     00         mov     eax, DWORD PTR [ebx+540]
  345.   00075    8d 34 b6     lea     esi, DWORD PTR [esi+esi*4]
  346.   00078    c1 e6 02     shl     esi, 2
  347.   0007b    83 7c 06 08 00     cmp     DWORD PTR [esi+eax+8], 0
  348.   00080    0f 86 7a 01 00
  349.     00         jbe     $L56403
  350.  
  351. ; 328  :         {
  352. ; 329  :             if (!m_bEmulate32BitIndex)
  353.  
  354.   00086    83 bb 24 02 00
  355.     00 00         cmp     DWORD PTR [ebx+548], 0
  356.   0008d    0f 85 86 00 00
  357.     00         jne     $L56396
  358.  
  359. ; 330  :             {
  360. ; 331  :                 ptmDrawMesh->GetVertexBuffer(&pVertexBuffer);
  361.  
  362.   00093    8b 45 08     mov     eax, DWORD PTR _ptmDrawMesh$[ebp]
  363.   00096    8b 08         mov     ecx, DWORD PTR [eax]
  364.   00098    8d 55 10     lea     edx, DWORD PTR _pVertexBuffer$[ebp]
  365.   0009b    52         push     edx
  366.   0009c    50         push     eax
  367.   0009d    ff 51 34     call     DWORD PTR [ecx+52]
  368.  
  369. ; 332  :                 m_pDevice->SetVertexDeclaration(m_pDeclObj);
  370.  
  371.   000a0    8b 03         mov     eax, DWORD PTR [ebx]
  372.   000a2    ff 73 08     push     DWORD PTR [ebx+8]
  373.   000a5    8b 08         mov     ecx, DWORD PTR [eax]
  374.   000a7    50         push     eax
  375.   000a8    ff 91 5c 01 00
  376.     00         call     DWORD PTR [ecx+348]
  377.  
  378. ; 333  :                 m_pDevice->SetStreamSource(0, pVertexBuffer, 0, m_cBytesPerVertex);
  379.  
  380.   000ae    ff b3 14 02 00
  381.     00         push     DWORD PTR [ebx+532]
  382.   000b4    8b 03         mov     eax, DWORD PTR [ebx]
  383.   000b6    8b 08         mov     ecx, DWORD PTR [eax]
  384.   000b8    6a 00         push     0
  385.   000ba    ff 75 10     push     DWORD PTR _pVertexBuffer$[ebp]
  386.   000bd    6a 00         push     0
  387.   000bf    50         push     eax
  388.   000c0    ff 91 90 01 00
  389.     00         call     DWORD PTR [ecx+400]
  390.  
  391. ; 334  :                 m_pDevice->SetIndices(m_pIndexBuffer);
  392.  
  393.   000c6    8b 03         mov     eax, DWORD PTR [ebx]
  394.   000c8    ff 73 04     push     DWORD PTR [ebx+4]
  395.   000cb    8b 08         mov     ecx, DWORD PTR [eax]
  396.   000cd    50         push     eax
  397.   000ce    ff 91 a0 01 00
  398.     00         call     DWORD PTR [ecx+416]
  399.  
  400. ; 335  : 
  401. ; 336  :                 hr = m_pDevice->DrawIndexedPrimitive(D3DPT_LINELIST, 
  402. ; 337  :                                              0, 0, m_rgaeAttributeTable[iSubset].VertexStart + m_rgaeAttributeTable[iSubset].VertexCount,
  403. ; 338  :                                              iStartIndex * 2, 
  404. ; 339  :                                              cLines);
  405.  
  406.   000d4    ff 75 14     push     DWORD PTR _cLines$[ebp]
  407.   000d7    8b 83 1c 02 00
  408.     00         mov     eax, DWORD PTR [ebx+540]
  409.   000dd    8b 0b         mov     ecx, DWORD PTR [ebx]
  410.   000df    8b 11         mov     edx, DWORD PTR [ecx]
  411.   000e1    03 c6         add     eax, esi
  412.   000e3    8d 34 3f     lea     esi, DWORD PTR [edi+edi]
  413.   000e6    56         push     esi
  414.   000e7    8b 70 10     mov     esi, DWORD PTR [eax+16]
  415.   000ea    03 70 0c     add     esi, DWORD PTR [eax+12]
  416.   000ed    56         push     esi
  417.   000ee    6a 00         push     0
  418.   000f0    6a 00         push     0
  419.   000f2    6a 02         push     2
  420.   000f4    51         push     ecx
  421.   000f5    ff 92 48 01 00
  422.     00         call     DWORD PTR [edx+328]
  423.  
  424. ; 340  :                 if (FAILED(hr))
  425.  
  426.   000fb    85 c0         test     eax, eax
  427.  
  428. ; 341  :                     return hr;
  429.  
  430.   000fd    0f 8c ff 00 00
  431.     00         jl     $L56374
  432.  
  433. ; 342  : 
  434. ; 343  :                 GXRELEASE(pVertexBuffer);
  435.  
  436.   00103    8b 45 10     mov     eax, DWORD PTR _pVertexBuffer$[ebp]
  437.   00106    85 c0         test     eax, eax
  438.   00108    0f 84 f2 00 00
  439.     00         je     $L56403
  440.   0010e    8b 08         mov     ecx, DWORD PTR [eax]
  441.   00110    50         push     eax
  442.   00111    ff 51 08     call     DWORD PTR [ecx+8]
  443.  
  444. ; 344  :             }
  445. ; 345  :             else
  446.  
  447.   00114    e9 e7 00 00 00     jmp     $L56403
  448. $L56396:
  449.  
  450. ; 346  :             {
  451. ; 347  :                 GXASSERT(ptmDrawMesh->GetOptions() & D3DXMESH_32BIT);
  452. ; 348  : 
  453. ; 349  :                 hr = ptmDrawMesh->LockVertexBuffer(D3DLOCK_READONLY, (PVOID*)&pbPoints);
  454.  
  455.   00119    8b 75 08     mov     esi, DWORD PTR _ptmDrawMesh$[ebp]
  456.   0011c    8b 06         mov     eax, DWORD PTR [esi]
  457.   0011e    8d 4d f8     lea     ecx, DWORD PTR _pbPoints$[ebp]
  458.   00121    51         push     ecx
  459.   00122    6a 10         push     16            ; 00000010H
  460.   00124    56         push     esi
  461.   00125    ff 50 3c     call     DWORD PTR [eax+60]
  462.  
  463. ; 350  :                 if (FAILED(hr))
  464.  
  465.   00128    85 c0         test     eax, eax
  466.  
  467. ; 351  :                     return hr;
  468.  
  469.   0012a    0f 8c d2 00 00
  470.     00         jl     $L56374
  471.  
  472. ; 352  : 
  473. ; 353  :                 hr = m_pIndexBuffer->Lock(0, 0, (PVOID*)&pdwLineIndices, D3DLOCK_NOSYSLOCK|D3DLOCK_READONLY);
  474.  
  475.   00130    8b 43 04     mov     eax, DWORD PTR [ebx+4]
  476.   00133    8b 08         mov     ecx, DWORD PTR [eax]
  477.   00135    68 10 08 00 00     push     2064            ; 00000810H
  478.   0013a    8d 55 fc     lea     edx, DWORD PTR _pdwLineIndices$[ebp]
  479.   0013d    52         push     edx
  480.   0013e    6a 00         push     0
  481.   00140    6a 00         push     0
  482.   00142    50         push     eax
  483.   00143    ff 51 2c     call     DWORD PTR [ecx+44]
  484.  
  485. ; 354  :                 if (FAILED(hr))
  486.  
  487.   00146    85 c0         test     eax, eax
  488.  
  489. ; 355  :                     return hr;
  490.  
  491.   00148    0f 8c b4 00 00
  492.     00         jl     $L56374
  493.  
  494. ; 356  : 
  495. ; 357  :                 pbLine = (PBYTE)_alloca(m_cBytesPerVertex * 2);
  496.  
  497.   0014e    8b 83 14 02 00
  498.     00         mov     eax, DWORD PTR [ebx+532]
  499.   00154    d1 e0         shl     eax, 1
  500.   00156    83 c0 03     add     eax, 3
  501.   00159    83 e0 fc     and     eax, -4            ; fffffffcH
  502.   0015c    e8 00 00 00 00     call     __alloca_probe
  503.  
  504. ; 358  : 
  505. ; 359  :                 iLineStart = iStartIndex * 2;
  506. ; 360  :                 iLineEnd = iLineStart + cLines * 2;
  507.  
  508.   00161    8b 4d 14     mov     ecx, DWORD PTR _cLines$[ebp]
  509.   00164    8d 04 3f     lea     eax, DWORD PTR [edi+edi]
  510.   00167    8d 0c 48     lea     ecx, DWORD PTR [eax+ecx*2]
  511.  
  512. ; 361  :                 for (iLine = iLineStart; iLine < iLineEnd; iLine+=2)
  513.  
  514.   0016a    3b c1         cmp     eax, ecx
  515.   0016c    89 65 0c     mov     DWORD PTR _pbLine$[ebp], esp
  516.   0016f    89 4d f4     mov     DWORD PTR _iLineEnd$[ebp], ecx
  517.   00172    89 45 14     mov     DWORD PTR _iLine$[ebp], eax
  518.   00175    73 7a         jae     SHORT $L56414
  519. $L56412:
  520.  
  521. ; 362  :                 {
  522. ; 363  :                     memcpy(pbLine, pbPoints + pdwLineIndices[iLine]*m_cBytesPerVertex, m_cBytesPerVertex);
  523.  
  524.   00177    8b 55 fc     mov     edx, DWORD PTR _pdwLineIndices$[ebp]
  525.   0017a    8b 8b 14 02 00
  526.     00         mov     ecx, DWORD PTR [ebx+532]
  527.   00180    8b 45 14     mov     eax, DWORD PTR _iLine$[ebp]
  528.   00183    8b 7d 0c     mov     edi, DWORD PTR _pbLine$[ebp]
  529.   00186    c1 e0 02     shl     eax, 2
  530.   00189    8b 34 10     mov     esi, DWORD PTR [eax+edx]
  531.   0018c    0f af f1     imul     esi, ecx
  532.   0018f    03 75 f8     add     esi, DWORD PTR _pbPoints$[ebp]
  533.   00192    8b d1         mov     edx, ecx
  534.   00194    c1 e9 02     shr     ecx, 2
  535.   00197    f3 a5         rep movsd
  536.   00199    8b ca         mov     ecx, edx
  537.   0019b    83 e1 03     and     ecx, 3
  538.   0019e    f3 a4         rep movsb
  539.  
  540. ; 364  :                     memcpy(pbLine + m_cBytesPerVertex, pbPoints + pdwLineIndices[iLine+1]*m_cBytesPerVertex, m_cBytesPerVertex);
  541.  
  542.   001a0    8b 8b 14 02 00
  543.     00         mov     ecx, DWORD PTR [ebx+532]
  544.   001a6    8b 55 fc     mov     edx, DWORD PTR _pdwLineIndices$[ebp]
  545.   001a9    8b 74 10 04     mov     esi, DWORD PTR [eax+edx+4]
  546.   001ad    0f af f1     imul     esi, ecx
  547.   001b0    03 75 f8     add     esi, DWORD PTR _pbPoints$[ebp]
  548.   001b3    8b f9         mov     edi, ecx
  549.   001b5    03 7d 0c     add     edi, DWORD PTR _pbLine$[ebp]
  550.   001b8    8b c1         mov     eax, ecx
  551.   001ba    c1 e9 02     shr     ecx, 2
  552.   001bd    f3 a5         rep movsd
  553.   001bf    8b c8         mov     ecx, eax
  554.   001c1    83 e1 03     and     ecx, 3
  555.   001c4    f3 a4         rep movsb
  556.  
  557. ; 365  : 
  558. ; 366  :                     hr = m_pDevice->DrawPrimitiveUP(D3DPT_LINELIST, 1, pbLine, m_cBytesPerVertex);
  559.  
  560.   001c6    ff b3 14 02 00
  561.     00         push     DWORD PTR [ebx+532]
  562.   001cc    8b 03         mov     eax, DWORD PTR [ebx]
  563.   001ce    ff 75 0c     push     DWORD PTR _pbLine$[ebp]
  564.   001d1    8b 08         mov     ecx, DWORD PTR [eax]
  565.   001d3    6a 01         push     1
  566.   001d5    6a 02         push     2
  567.   001d7    50         push     eax
  568.   001d8    ff 91 4c 01 00
  569.     00         call     DWORD PTR [ecx+332]
  570.  
  571. ; 367  :                     if (FAILED(hr))
  572.  
  573.   001de    85 c0         test     eax, eax
  574.   001e0    7c 20         jl     SHORT $L56374
  575.   001e2    83 45 14 02     add     DWORD PTR _iLine$[ebp], 2
  576.   001e6    8b 45 14     mov     eax, DWORD PTR _iLine$[ebp]
  577.   001e9    3b 45 f4     cmp     eax, DWORD PTR _iLineEnd$[ebp]
  578.   001ec    72 89         jb     SHORT $L56412
  579.   001ee    8b 75 08     mov     esi, DWORD PTR _ptmDrawMesh$[ebp]
  580. $L56414:
  581.  
  582. ; 368  :                         return hr;
  583. ; 369  :                 }
  584. ; 370  : 
  585. ; 371  :                 ptmDrawMesh->UnlockVertexBuffer();
  586.  
  587.   001f1    8b 06         mov     eax, DWORD PTR [esi]
  588.   001f3    56         push     esi
  589.   001f4    ff 50 40     call     DWORD PTR [eax+64]
  590.  
  591. ; 372  :                 m_pIndexBuffer->Unlock();
  592.  
  593.   001f7    8b 5b 04     mov     ebx, DWORD PTR [ebx+4]
  594.   001fa    8b 03         mov     eax, DWORD PTR [ebx]
  595.   001fc    53         push     ebx
  596.   001fd    ff 50 30     call     DWORD PTR [eax+48]
  597. $L56403:
  598.  
  599. ; 373  :             }
  600. ; 374  :         }
  601. ; 375  :     }
  602. ; 376  :     return S_OK;
  603.  
  604.   00200    33 c0         xor     eax, eax
  605. $L56374:
  606.  
  607. ; 377  : }
  608.  
  609.   00202    8d 65 e8     lea     esp, DWORD PTR [ebp-24]
  610.   00205    5f         pop     edi
  611.   00206    5e         pop     esi
  612.   00207    5b         pop     ebx
  613.   00208    c9         leave
  614.   00209    c2 10 00     ret     16            ; 00000010H
  615. ?DrawInternal@CNPatchOutline@@AAEJPAUID3DXBaseMesh@@KKK@Z ENDP ; CNPatchOutline::DrawInternal
  616. _TEXT    ENDS
  617. PUBLIC    ?Draw@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z    ; CNPatchOutline::Draw
  618. ; Function compile flags: /Ogs
  619. ;    COMDAT ?Draw@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z
  620. _TEXT    SEGMENT
  621. _ptmDrawMesh$ = 8                    ; size = 4
  622. _iSubset$ = 12                        ; size = 4
  623. ?Draw@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z PROC NEAR ; CNPatchOutline::Draw, COMDAT
  624. ; _this$ = ecx
  625.  
  626. ; 386  : }
  627.  
  628.   00000    8b ff         npad     2
  629.  
  630. ; 381  : {
  631.  
  632.   00002    55         push     ebp
  633.   00003    8b ec         mov     ebp, esp
  634.  
  635. ; 382  :     if (iSubset < m_caeAttributeTable)
  636.  
  637.   00005    8b 45 0c     mov     eax, DWORD PTR _iSubset$[ebp]
  638.   00008    3b 81 20 02 00
  639.     00         cmp     eax, DWORD PTR [ecx+544]
  640.   0000e    73 0f         jae     SHORT $L56423
  641.  
  642. ; 383  :         return DrawInternal(ptmDrawMesh, iSubset, UNUSED32, UNUSED32);
  643.  
  644.   00010    6a ff         push     -1
  645.   00012    6a ff         push     -1
  646.   00014    50         push     eax
  647.   00015    ff 75 08     push     DWORD PTR _ptmDrawMesh$[ebp]
  648.   00018    e8 00 00 00 00     call     ?DrawInternal@CNPatchOutline@@AAEJPAUID3DXBaseMesh@@KKK@Z ; CNPatchOutline::DrawInternal
  649.   0001d    eb 02         jmp     SHORT $L56424
  650. $L56423:
  651.  
  652. ; 384  :     else
  653. ; 385  :         return S_OK;
  654.  
  655.   0001f    33 c0         xor     eax, eax
  656. $L56424:
  657.  
  658. ; 386  : }
  659.  
  660.   00021    5d         pop     ebp
  661.   00022    c2 08 00     ret     8
  662. ?Draw@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z ENDP    ; CNPatchOutline::Draw
  663. _TEXT    ENDS
  664. PUBLIC    ?DrawFace@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@KK@Z ; CNPatchOutline::DrawFace
  665. ; Function compile flags: /Ogs
  666. ;    COMDAT ?DrawFace@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@KK@Z
  667. _TEXT    SEGMENT
  668. _ptmDrawMesh$ = 8                    ; size = 4
  669. _iFace$ = 12                        ; size = 4
  670. _iSubset$ = 16                        ; size = 4
  671. ?DrawFace@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@KK@Z PROC NEAR ; CNPatchOutline::DrawFace, COMDAT
  672. ; _this$ = ecx
  673.  
  674. ; 395  : }
  675.  
  676.   00000    8b ff         npad     2
  677.  
  678. ; 390  : {
  679.  
  680.   00002    55         push     ebp
  681.   00003    8b ec         mov     ebp, esp
  682.  
  683. ; 391  :     if (iSubset < m_caeAttributeTable)
  684.  
  685.   00005    8b 55 10     mov     edx, DWORD PTR _iSubset$[ebp]
  686.   00008    3b 91 20 02 00
  687.     00         cmp     edx, DWORD PTR [ecx+544]
  688.   0000e    73 17         jae     SHORT $L56432
  689.  
  690. ; 392  :         return DrawInternal(ptmDrawMesh, iSubset, iFace * m_cLinesPerOrigFace, m_cLinesPerOrigFace);
  691.  
  692.   00010    8b 81 18 02 00
  693.     00         mov     eax, DWORD PTR [ecx+536]
  694.   00016    50         push     eax
  695.   00017    0f af 45 0c     imul     eax, DWORD PTR _iFace$[ebp]
  696.   0001b    50         push     eax
  697.   0001c    52         push     edx
  698.   0001d    ff 75 08     push     DWORD PTR _ptmDrawMesh$[ebp]
  699.   00020    e8 00 00 00 00     call     ?DrawInternal@CNPatchOutline@@AAEJPAUID3DXBaseMesh@@KKK@Z ; CNPatchOutline::DrawInternal
  700.   00025    eb 02         jmp     SHORT $L56433
  701. $L56432:
  702.  
  703. ; 393  :     else
  704. ; 394  :         return S_OK;
  705.  
  706.   00027    33 c0         xor     eax, eax
  707. $L56433:
  708.  
  709. ; 395  : }
  710.  
  711.   00029    5d         pop     ebp
  712.   0002a    c2 0c 00     ret     12            ; 0000000cH
  713. ?DrawFace@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@KK@Z ENDP ; CNPatchOutline::DrawFace
  714. _TEXT    ENDS
  715. PUBLIC    ?CreateEmptyOutline@CNPatchOutline@@QAEJXZ    ; CNPatchOutline::CreateEmptyOutline
  716. ; Function compile flags: /Ogs
  717. ;    COMDAT ?CreateEmptyOutline@CNPatchOutline@@QAEJXZ
  718. _TEXT    SEGMENT
  719. ?CreateEmptyOutline@CNPatchOutline@@QAEJXZ PROC NEAR    ; CNPatchOutline::CreateEmptyOutline, COMDAT
  720. ; _this$ = ecx
  721.  
  722. ; 408  : }
  723.  
  724.   00000    8b ff         npad     2
  725.   00002    53         push     ebx
  726.   00003    56         push     esi
  727.  
  728. ; 399  : {
  729.  
  730.   00004    8b f1         mov     esi, ecx
  731.   00006    57         push     edi
  732.  
  733. ; 400  :     delete []m_rgaeAttributeTable;
  734.  
  735.   00007    8d be 1c 02 00
  736.     00         lea     edi, DWORD PTR [esi+540]
  737.   0000d    ff 37         push     DWORD PTR [edi]
  738.   0000f    e8 00 00 00 00     call     ??3@YAXPAX@Z        ; operator delete
  739.  
  740. ; 401  :     m_rgaeAttributeTable = NULL;
  741. ; 402  :     m_caeAttributeTable = 0;
  742. ; 403  :     GXRELEASE(m_pIndexBuffer);
  743.  
  744.   00014    8b 46 04     mov     eax, DWORD PTR [esi+4]
  745.   00017    33 db         xor     ebx, ebx
  746.   00019    3b c3         cmp     eax, ebx
  747.   0001b    59         pop     ecx
  748.   0001c    89 1f         mov     DWORD PTR [edi], ebx
  749.   0001e    89 9e 20 02 00
  750.     00         mov     DWORD PTR [esi+544], ebx
  751.   00024    74 09         je     SHORT $L56440
  752.   00026    8b 08         mov     ecx, DWORD PTR [eax]
  753.   00028    50         push     eax
  754.   00029    ff 51 08     call     DWORD PTR [ecx+8]
  755.   0002c    89 5e 04     mov     DWORD PTR [esi+4], ebx
  756. $L56440:
  757.  
  758. ; 404  :     GXRELEASE(m_pDevice);
  759.  
  760.   0002f    8b 06         mov     eax, DWORD PTR [esi]
  761.   00031    3b c3         cmp     eax, ebx
  762.   00033    74 08         je     SHORT $L56444
  763.   00035    8b 08         mov     ecx, DWORD PTR [eax]
  764.   00037    50         push     eax
  765.   00038    ff 51 08     call     DWORD PTR [ecx+8]
  766.   0003b    89 1e         mov     DWORD PTR [esi], ebx
  767. $L56444:
  768.  
  769. ; 405  :     GXRELEASE(m_pDeclObj);
  770.  
  771.   0003d    8b 46 08     mov     eax, DWORD PTR [esi+8]
  772.   00040    3b c3         cmp     eax, ebx
  773.   00042    74 09         je     SHORT $L56448
  774.   00044    8b 08         mov     ecx, DWORD PTR [eax]
  775.   00046    50         push     eax
  776.   00047    ff 51 08     call     DWORD PTR [ecx+8]
  777.   0004a    89 5e 08     mov     DWORD PTR [esi+8], ebx
  778. $L56448:
  779.   0004d    5f         pop     edi
  780.   0004e    5e         pop     esi
  781.  
  782. ; 406  : 
  783. ; 407  :     return S_OK;
  784.  
  785.   0004f    33 c0         xor     eax, eax
  786.   00051    5b         pop     ebx
  787.  
  788. ; 408  : }
  789.  
  790.   00052    c3         ret     0
  791. ?CreateEmptyOutline@CNPatchOutline@@QAEJXZ ENDP        ; CNPatchOutline::CreateEmptyOutline
  792. _TEXT    ENDS
  793. PUBLIC    ??$AddOutlineLineSegments@G@@YAXPAGK0@Z        ; AddOutlineLineSegments<unsigned short>
  794. ; Function compile flags: /Ogs
  795. ;    COMDAT ??$AddOutlineLineSegments@G@@YAXPAGK0@Z
  796. _TEXT    SEGMENT
  797. _pwNPatchFaceIndices$ = 8                ; size = 4
  798. _cFacesCurLine$ = 12                    ; size = 4
  799. _cSegments$ = 12                    ; size = 4
  800. _pwLineIndicesOut$ = 16                    ; size = 4
  801. ??$AddOutlineLineSegments@G@@YAXPAGK0@Z PROC NEAR    ; AddOutlineLineSegments<unsigned short>, COMDAT
  802.  
  803. ; 135  :     pwLineIndicesOut++;
  804. ; 136  : 
  805. ; 137  :     GXASSERT(pwLineIndicesOrig + cSegments * 2 * 3 == pwLineIndicesOut);
  806. ; 138  : }
  807.  
  808.   00000    8b ff         npad     2
  809.  
  810. ; 74   : {
  811.  
  812.   00002    55         push     ebp
  813.   00003    8b ec         mov     ebp, esp
  814.  
  815. ; 75   :     DWORD cFacesCurLine;
  816. ; 76   :     DWORD iLevel;
  817. ; 77   :     DWORD iFaceCur;
  818. ; 78   : 
  819. ; 79   :     UINT_IDX *pwLineIndicesOrig = pwLineIndicesOut;
  820. ; 80   : 
  821. ; 81   :     // first deal with all triangles up to the last "strip" of tesselate triangles (three sides of lines, not just two for that row)
  822. ; 82   :     cFacesCurLine = 1;
  823. ; 83   :     for (iLevel = 0; iLevel < cSegments-1; iLevel++)
  824.  
  825.   00005    8b 45 0c     mov     eax, DWORD PTR _cSegments$[ebp]
  826.   00008    8b 4d 08     mov     ecx, DWORD PTR _pwNPatchFaceIndices$[ebp]
  827.   0000b    56         push     esi
  828.   0000c    57         push     edi
  829.   0000d    33 f6         xor     esi, esi
  830.   0000f    46         inc     esi
  831.   00010    48         dec     eax
  832.   00011    6a 02         push     2
  833.   00013    5a         pop     edx
  834.   00014    74 45         je     SHORT $L56523
  835.   00016    8b f8         mov     edi, eax
  836.   00018    6a 06         push     6
  837.   0001a    8d 44 3f 01     lea     eax, DWORD PTR [edi+edi+1]
  838.   0001e    5e         pop     esi
  839.   0001f    89 45 0c     mov     DWORD PTR _cFacesCurLine$[ebp], eax
  840.   00022    8b 45 10     mov     eax, DWORD PTR _pwLineIndicesOut$[ebp]
  841.   00025    53         push     ebx
  842. $L56457:
  843.  
  844. ; 84   :     {
  845. ; 85   :         // Add the left edge
  846. ; 86   :         *pwLineIndicesOut = pwNPatchFaceIndices[0];
  847.  
  848.   00026    66 8b 19     mov     bx, WORD PTR [ecx]
  849.   00029    66 89 18     mov     WORD PTR [eax], bx
  850.  
  851. ; 87   :         pwLineIndicesOut++;
  852. ; 88   :         *pwLineIndicesOut = pwNPatchFaceIndices[1];
  853.  
  854.   0002c    66 8b 59 02     mov     bx, WORD PTR [ecx+2]
  855.   00030    03 c2         add     eax, edx
  856.   00032    66 89 18     mov     WORD PTR [eax], bx
  857.  
  858. ; 89   :         pwLineIndicesOut++;
  859. ; 90   : 
  860. ; 91   :         // skip the interior triangles of this strip
  861. ; 92   :         pwNPatchFaceIndices += 3 * (cFacesCurLine - 1);
  862.  
  863.   00035    8d 4c 31 fa     lea     ecx, DWORD PTR [ecx+esi-6]
  864.  
  865. ; 93   : 
  866. ; 94   :         // add the right edge
  867. ; 95   :         *pwLineIndicesOut = pwNPatchFaceIndices[0];
  868.  
  869.   00039    66 8b 19     mov     bx, WORD PTR [ecx]
  870.   0003c    03 c2         add     eax, edx
  871.   0003e    66 89 18     mov     WORD PTR [eax], bx
  872.  
  873. ; 96   :         pwLineIndicesOut++;
  874. ; 97   :         *pwLineIndicesOut = pwNPatchFaceIndices[2];
  875.  
  876.   00041    66 8b 59 04     mov     bx, WORD PTR [ecx+4]
  877.   00045    03 c2         add     eax, edx
  878.   00047    66 89 18     mov     WORD PTR [eax], bx
  879.  
  880. ; 98   :         pwLineIndicesOut++;
  881.  
  882.   0004a    03 c2         add     eax, edx
  883.  
  884. ; 99   :         pwNPatchFaceIndices += 3;
  885.  
  886.   0004c    83 c1 06     add     ecx, 6
  887.  
  888. ; 100  : 
  889. ; 101  :         cFacesCurLine += 2;        
  890.  
  891.   0004f    83 c6 0c     add     esi, 12            ; 0000000cH
  892.   00052    4f         dec     edi
  893.   00053    75 d1         jne     SHORT $L56457
  894.   00055    8b 75 0c     mov     esi, DWORD PTR _cFacesCurLine$[ebp]
  895.   00058    5b         pop     ebx
  896.   00059    eb 03         jmp     SHORT $L56459
  897. $L56523:
  898.  
  899. ; 75   :     DWORD cFacesCurLine;
  900. ; 76   :     DWORD iLevel;
  901. ; 77   :     DWORD iFaceCur;
  902. ; 78   : 
  903. ; 79   :     UINT_IDX *pwLineIndicesOrig = pwLineIndicesOut;
  904. ; 80   : 
  905. ; 81   :     // first deal with all triangles up to the last "strip" of tesselate triangles (three sides of lines, not just two for that row)
  906. ; 82   :     cFacesCurLine = 1;
  907. ; 83   :     for (iLevel = 0; iLevel < cSegments-1; iLevel++)
  908.  
  909.   0005b    8b 45 10     mov     eax, DWORD PTR _pwLineIndicesOut$[ebp]
  910. $L56459:
  911.  
  912. ; 102  :     }
  913. ; 103  : 
  914. ; 104  :     // add the left edge
  915. ; 105  :     *pwLineIndicesOut = pwNPatchFaceIndices[0];
  916.  
  917.   0005e    66 8b 39     mov     di, WORD PTR [ecx]
  918.   00061    66 89 38     mov     WORD PTR [eax], di
  919.  
  920. ; 106  :     pwLineIndicesOut++;
  921. ; 107  :     *pwLineIndicesOut = pwNPatchFaceIndices[1];
  922.  
  923.   00064    66 8b 79 02     mov     di, WORD PTR [ecx+2]
  924.   00068    03 c2         add     eax, edx
  925.   0006a    66 89 38     mov     WORD PTR [eax], di
  926.  
  927. ; 108  :     pwLineIndicesOut++;
  928.  
  929.   0006d    03 c2         add     eax, edx
  930.  
  931. ; 109  : 
  932. ; 110  :     // add the bottom edges of all triangles in the middle of the bottom strip
  933. ; 111  :     if (cFacesCurLine > 1)
  934.  
  935.   0006f    83 fe 01     cmp     esi, 1
  936.   00072    76 21         jbe     SHORT $L56463
  937.  
  938. ; 112  :     {
  939. ; 113  :         // add the bottom edge
  940. ; 114  :         for (iFaceCur = 0; iFaceCur < cFacesCurLine - 2; iFaceCur += 2)
  941.  
  942.   00074    83 c6 fe     add     esi, -2            ; fffffffeH
  943.   00077    74 1c         je     SHORT $L56463
  944.   00079    4e         dec     esi
  945.   0007a    d1 ee         shr     esi, 1
  946.   0007c    46         inc     esi
  947. $L56461:
  948.  
  949. ; 115  :         {
  950. ; 116  :             *pwLineIndicesOut = pwNPatchFaceIndices[1];
  951.  
  952.   0007d    66 8b 79 02     mov     di, WORD PTR [ecx+2]
  953.   00081    66 89 38     mov     WORD PTR [eax], di
  954.  
  955. ; 117  :             pwLineIndicesOut++;
  956. ; 118  :             *pwLineIndicesOut = pwNPatchFaceIndices[2];
  957.  
  958.   00084    66 8b 79 04     mov     di, WORD PTR [ecx+4]
  959.   00088    03 c2         add     eax, edx
  960.   0008a    66 89 38     mov     WORD PTR [eax], di
  961.  
  962. ; 119  :             pwLineIndicesOut++;
  963.  
  964.   0008d    03 c2         add     eax, edx
  965.  
  966. ; 120  : 
  967. ; 121  :             pwNPatchFaceIndices += 6;
  968.  
  969.   0008f    83 c1 0c     add     ecx, 12            ; 0000000cH
  970.   00092    4e         dec     esi
  971.   00093    75 e8         jne     SHORT $L56461
  972. $L56463:
  973.  
  974. ; 122  :         }
  975. ; 123  :     }
  976. ; 124  : 
  977. ; 125  :     // add the right edge of the last triangle
  978. ; 126  :     *pwLineIndicesOut = pwNPatchFaceIndices[0];
  979.  
  980.   00095    66 8b 31     mov     si, WORD PTR [ecx]
  981.   00098    66 89 30     mov     WORD PTR [eax], si
  982.  
  983. ; 127  :     pwLineIndicesOut++;
  984. ; 128  :     *pwLineIndicesOut = pwNPatchFaceIndices[2];
  985.  
  986.   0009b    66 8b 71 04     mov     si, WORD PTR [ecx+4]
  987.   0009f    03 c2         add     eax, edx
  988.   000a1    66 89 30     mov     WORD PTR [eax], si
  989.  
  990. ; 129  :     pwLineIndicesOut++;
  991.  
  992.   000a4    03 c2         add     eax, edx
  993.  
  994. ; 130  : 
  995. ; 131  :     // add the bottom edge of the last triangle
  996. ; 132  :     *pwLineIndicesOut = pwNPatchFaceIndices[1];
  997.  
  998.   000a6    66 8b 51 02     mov     dx, WORD PTR [ecx+2]
  999.   000aa    66 89 10     mov     WORD PTR [eax], dx
  1000.  
  1001. ; 133  :     pwLineIndicesOut++;
  1002. ; 134  :     *pwLineIndicesOut = pwNPatchFaceIndices[2];
  1003.  
  1004.   000ad    66 8b 49 04     mov     cx, WORD PTR [ecx+4]
  1005.   000b1    5f         pop     edi
  1006.   000b2    66 89 48 02     mov     WORD PTR [eax+2], cx
  1007.   000b6    5e         pop     esi
  1008.  
  1009. ; 135  :     pwLineIndicesOut++;
  1010. ; 136  : 
  1011. ; 137  :     GXASSERT(pwLineIndicesOrig + cSegments * 2 * 3 == pwLineIndicesOut);
  1012. ; 138  : }
  1013.  
  1014.   000b7    5d         pop     ebp
  1015.   000b8    c3         ret     0
  1016. ??$AddOutlineLineSegments@G@@YAXPAGK0@Z ENDP        ; AddOutlineLineSegments<unsigned short>
  1017. _TEXT    ENDS
  1018. PUBLIC    ??$AddOutlineLineSegments@I@@YAXPAIK0@Z        ; AddOutlineLineSegments<unsigned int>
  1019. ; Function compile flags: /Ogs
  1020. ;    COMDAT ??$AddOutlineLineSegments@I@@YAXPAIK0@Z
  1021. _TEXT    SEGMENT
  1022. _pwNPatchFaceIndices$ = 8                ; size = 4
  1023. _cFacesCurLine$ = 12                    ; size = 4
  1024. _cSegments$ = 12                    ; size = 4
  1025. _pwLineIndicesOut$ = 16                    ; size = 4
  1026. ??$AddOutlineLineSegments@I@@YAXPAIK0@Z PROC NEAR    ; AddOutlineLineSegments<unsigned int>, COMDAT
  1027.  
  1028. ; 135  :     pwLineIndicesOut++;
  1029. ; 136  : 
  1030. ; 137  :     GXASSERT(pwLineIndicesOrig + cSegments * 2 * 3 == pwLineIndicesOut);
  1031. ; 138  : }
  1032.  
  1033.   00000    8b ff         npad     2
  1034.  
  1035. ; 74   : {
  1036.  
  1037.   00002    55         push     ebp
  1038.   00003    8b ec         mov     ebp, esp
  1039.  
  1040. ; 75   :     DWORD cFacesCurLine;
  1041. ; 76   :     DWORD iLevel;
  1042. ; 77   :     DWORD iFaceCur;
  1043. ; 78   : 
  1044. ; 79   :     UINT_IDX *pwLineIndicesOrig = pwLineIndicesOut;
  1045. ; 80   : 
  1046. ; 81   :     // first deal with all triangles up to the last "strip" of tesselate triangles (three sides of lines, not just two for that row)
  1047. ; 82   :     cFacesCurLine = 1;
  1048. ; 83   :     for (iLevel = 0; iLevel < cSegments-1; iLevel++)
  1049.  
  1050.   00005    8b 45 0c     mov     eax, DWORD PTR _cSegments$[ebp]
  1051.   00008    8b 4d 08     mov     ecx, DWORD PTR _pwNPatchFaceIndices$[ebp]
  1052.   0000b    56         push     esi
  1053.   0000c    57         push     edi
  1054.   0000d    33 f6         xor     esi, esi
  1055.   0000f    46         inc     esi
  1056.   00010    48         dec     eax
  1057.   00011    6a 04         push     4
  1058.   00013    5a         pop     edx
  1059.   00014    74 3d         je     SHORT $L56529
  1060.   00016    8b f8         mov     edi, eax
  1061.   00018    6a 0c         push     12            ; 0000000cH
  1062.   0001a    8d 44 3f 01     lea     eax, DWORD PTR [edi+edi+1]
  1063.   0001e    5e         pop     esi
  1064.   0001f    89 45 0c     mov     DWORD PTR _cFacesCurLine$[ebp], eax
  1065.   00022    8b 45 10     mov     eax, DWORD PTR _pwLineIndicesOut$[ebp]
  1066.   00025    53         push     ebx
  1067. $L56470:
  1068.  
  1069. ; 84   :     {
  1070. ; 85   :         // Add the left edge
  1071. ; 86   :         *pwLineIndicesOut = pwNPatchFaceIndices[0];
  1072.  
  1073.   00026    8b 19         mov     ebx, DWORD PTR [ecx]
  1074.   00028    89 18         mov     DWORD PTR [eax], ebx
  1075.  
  1076. ; 87   :         pwLineIndicesOut++;
  1077. ; 88   :         *pwLineIndicesOut = pwNPatchFaceIndices[1];
  1078.  
  1079.   0002a    8b 59 04     mov     ebx, DWORD PTR [ecx+4]
  1080.   0002d    03 c2         add     eax, edx
  1081.   0002f    89 18         mov     DWORD PTR [eax], ebx
  1082.  
  1083. ; 89   :         pwLineIndicesOut++;
  1084. ; 90   : 
  1085. ; 91   :         // skip the interior triangles of this strip
  1086. ; 92   :         pwNPatchFaceIndices += 3 * (cFacesCurLine - 1);
  1087.  
  1088.   00031    8d 4c 31 f4     lea     ecx, DWORD PTR [ecx+esi-12]
  1089.  
  1090. ; 93   : 
  1091. ; 94   :         // add the right edge
  1092. ; 95   :         *pwLineIndicesOut = pwNPatchFaceIndices[0];
  1093.  
  1094.   00035    8b 19         mov     ebx, DWORD PTR [ecx]
  1095.   00037    03 c2         add     eax, edx
  1096.   00039    89 18         mov     DWORD PTR [eax], ebx
  1097.  
  1098. ; 96   :         pwLineIndicesOut++;
  1099. ; 97   :         *pwLineIndicesOut = pwNPatchFaceIndices[2];
  1100.  
  1101.   0003b    8b 59 08     mov     ebx, DWORD PTR [ecx+8]
  1102.   0003e    03 c2         add     eax, edx
  1103.   00040    89 18         mov     DWORD PTR [eax], ebx
  1104.  
  1105. ; 98   :         pwLineIndicesOut++;
  1106.  
  1107.   00042    03 c2         add     eax, edx
  1108.  
  1109. ; 99   :         pwNPatchFaceIndices += 3;
  1110.  
  1111.   00044    83 c1 0c     add     ecx, 12            ; 0000000cH
  1112.  
  1113. ; 100  : 
  1114. ; 101  :         cFacesCurLine += 2;        
  1115.  
  1116.   00047    83 c6 18     add     esi, 24            ; 00000018H
  1117.   0004a    4f         dec     edi
  1118.   0004b    75 d9         jne     SHORT $L56470
  1119.   0004d    8b 75 0c     mov     esi, DWORD PTR _cFacesCurLine$[ebp]
  1120.   00050    5b         pop     ebx
  1121.   00051    eb 03         jmp     SHORT $L56472
  1122. $L56529:
  1123.  
  1124. ; 75   :     DWORD cFacesCurLine;
  1125. ; 76   :     DWORD iLevel;
  1126. ; 77   :     DWORD iFaceCur;
  1127. ; 78   : 
  1128. ; 79   :     UINT_IDX *pwLineIndicesOrig = pwLineIndicesOut;
  1129. ; 80   : 
  1130. ; 81   :     // first deal with all triangles up to the last "strip" of tesselate triangles (three sides of lines, not just two for that row)
  1131. ; 82   :     cFacesCurLine = 1;
  1132. ; 83   :     for (iLevel = 0; iLevel < cSegments-1; iLevel++)
  1133.  
  1134.   00053    8b 45 10     mov     eax, DWORD PTR _pwLineIndicesOut$[ebp]
  1135. $L56472:
  1136.  
  1137. ; 102  :     }
  1138. ; 103  : 
  1139. ; 104  :     // add the left edge
  1140. ; 105  :     *pwLineIndicesOut = pwNPatchFaceIndices[0];
  1141.  
  1142.   00056    8b 39         mov     edi, DWORD PTR [ecx]
  1143.   00058    89 38         mov     DWORD PTR [eax], edi
  1144.  
  1145. ; 106  :     pwLineIndicesOut++;
  1146. ; 107  :     *pwLineIndicesOut = pwNPatchFaceIndices[1];
  1147.  
  1148.   0005a    8b 79 04     mov     edi, DWORD PTR [ecx+4]
  1149.   0005d    03 c2         add     eax, edx
  1150.   0005f    89 38         mov     DWORD PTR [eax], edi
  1151.  
  1152. ; 108  :     pwLineIndicesOut++;
  1153.  
  1154.   00061    03 c2         add     eax, edx
  1155.  
  1156. ; 109  : 
  1157. ; 110  :     // add the bottom edges of all triangles in the middle of the bottom strip
  1158. ; 111  :     if (cFacesCurLine > 1)
  1159.  
  1160.   00063    83 fe 01     cmp     esi, 1
  1161.   00066    76 1d         jbe     SHORT $L56476
  1162.  
  1163. ; 112  :     {
  1164. ; 113  :         // add the bottom edge
  1165. ; 114  :         for (iFaceCur = 0; iFaceCur < cFacesCurLine - 2; iFaceCur += 2)
  1166.  
  1167.   00068    83 c6 fe     add     esi, -2            ; fffffffeH
  1168.   0006b    74 18         je     SHORT $L56476
  1169.   0006d    4e         dec     esi
  1170.   0006e    d1 ee         shr     esi, 1
  1171.   00070    46         inc     esi
  1172. $L56474:
  1173.  
  1174. ; 115  :         {
  1175. ; 116  :             *pwLineIndicesOut = pwNPatchFaceIndices[1];
  1176.  
  1177.   00071    8b 79 04     mov     edi, DWORD PTR [ecx+4]
  1178.   00074    89 38         mov     DWORD PTR [eax], edi
  1179.  
  1180. ; 117  :             pwLineIndicesOut++;
  1181. ; 118  :             *pwLineIndicesOut = pwNPatchFaceIndices[2];
  1182.  
  1183.   00076    8b 79 08     mov     edi, DWORD PTR [ecx+8]
  1184.   00079    03 c2         add     eax, edx
  1185.   0007b    89 38         mov     DWORD PTR [eax], edi
  1186.  
  1187. ; 119  :             pwLineIndicesOut++;
  1188.  
  1189.   0007d    03 c2         add     eax, edx
  1190.  
  1191. ; 120  : 
  1192. ; 121  :             pwNPatchFaceIndices += 6;
  1193.  
  1194.   0007f    83 c1 18     add     ecx, 24            ; 00000018H
  1195.   00082    4e         dec     esi
  1196.   00083    75 ec         jne     SHORT $L56474
  1197. $L56476:
  1198.  
  1199. ; 122  :         }
  1200. ; 123  :     }
  1201. ; 124  : 
  1202. ; 125  :     // add the right edge of the last triangle
  1203. ; 126  :     *pwLineIndicesOut = pwNPatchFaceIndices[0];
  1204.  
  1205.   00085    8b 31         mov     esi, DWORD PTR [ecx]
  1206.   00087    89 30         mov     DWORD PTR [eax], esi
  1207.  
  1208. ; 127  :     pwLineIndicesOut++;
  1209. ; 128  :     *pwLineIndicesOut = pwNPatchFaceIndices[2];
  1210.  
  1211.   00089    8b 71 08     mov     esi, DWORD PTR [ecx+8]
  1212.   0008c    03 c2         add     eax, edx
  1213.   0008e    89 30         mov     DWORD PTR [eax], esi
  1214.  
  1215. ; 129  :     pwLineIndicesOut++;
  1216.  
  1217.   00090    03 c2         add     eax, edx
  1218.  
  1219. ; 130  : 
  1220. ; 131  :     // add the bottom edge of the last triangle
  1221. ; 132  :     *pwLineIndicesOut = pwNPatchFaceIndices[1];
  1222.  
  1223.   00092    8b 51 04     mov     edx, DWORD PTR [ecx+4]
  1224.   00095    89 10         mov     DWORD PTR [eax], edx
  1225.  
  1226. ; 133  :     pwLineIndicesOut++;
  1227. ; 134  :     *pwLineIndicesOut = pwNPatchFaceIndices[2];
  1228.  
  1229.   00097    8b 49 08     mov     ecx, DWORD PTR [ecx+8]
  1230.   0009a    5f         pop     edi
  1231.   0009b    89 48 04     mov     DWORD PTR [eax+4], ecx
  1232.   0009e    5e         pop     esi
  1233.  
  1234. ; 135  :     pwLineIndicesOut++;
  1235. ; 136  : 
  1236. ; 137  :     GXASSERT(pwLineIndicesOrig + cSegments * 2 * 3 == pwLineIndicesOut);
  1237. ; 138  : }
  1238.  
  1239.   0009f    5d         pop     ebp
  1240.   000a0    c3         ret     0
  1241. ??$AddOutlineLineSegments@I@@YAXPAIK0@Z ENDP        ; AddOutlineLineSegments<unsigned int>
  1242. _TEXT    ENDS
  1243. PUBLIC    ?Init@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z    ; CNPatchOutline::Init
  1244. EXTRN    ??2@YAPAXI@Z:NEAR                ; operator new
  1245. EXTRN    _D3DXGetDeclVertexSize@8:NEAR
  1246. ; Function compile flags: /Ogs
  1247. ;    COMDAT ?Init@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z
  1248. _TEXT    SEGMENT
  1249. _Caps$ = -344                        ; size = 304
  1250. _pbFaceIndices$ = -40                    ; size = 4
  1251. _pbLineIndices$ = -36                    ; size = 4
  1252. _b16BitIndex$ = -32                    ; size = 4
  1253. tv323 = -28                        ; size = 4
  1254. _cBytesPerIndex$ = -28                    ; size = 4
  1255. _cFacesOut$56540 = -24                    ; size = 4
  1256. _rgaeAttributeTableMesh$ = -20                ; size = 4
  1257. tv579 = -16                        ; size = 4
  1258. _cOrigFaces$ = -16                    ; size = 4
  1259. _cFaces$ = -16                        ; size = 4
  1260. tv261 = -12                        ; size = 4
  1261. _cFacesCur$ = -12                    ; size = 4
  1262. tv588 = -8                        ; size = 4
  1263. _pbLineIndicesCur$ = -8                    ; size = 4
  1264. _iAttr$ = -4                        ; size = 4
  1265. _hr$ = -4                        ; size = 4
  1266. _pbFaceIndicesCur$ = 8                    ; size = 4
  1267. _ptmMesh$ = 8                        ; size = 4
  1268. _cTesselateSegments$ = 12                ; size = 4
  1269. ?Init@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z PROC NEAR ; CNPatchOutline::Init, COMDAT
  1270. ; _this$ = ecx
  1271.  
  1272. ; 285  : }
  1273.  
  1274.   00000    8b ff         npad     2
  1275.  
  1276. ; 142  : {
  1277.  
  1278.   00002    55         push     ebp
  1279.   00003    8b ec         mov     ebp, esp
  1280.   00005    81 ec 58 01 00
  1281.     00         sub     esp, 344        ; 00000158H
  1282.   0000b    53         push     ebx
  1283.   0000c    56         push     esi
  1284.  
  1285. ; 143  :     HRESULT hr = S_OK;
  1286. ; 144  :     BOOL b16BitIndex;
  1287. ; 145  :     DWORD cBytesPerIndex;
  1288. ; 146  :     DWORD iPoint;
  1289. ; 147  :     DWORD iOrigFace;
  1290. ; 148  :     DWORD cFaces;
  1291. ; 149  :     DWORD cOrigFaces;
  1292. ; 150  :     D3DXATTRIBUTERANGE *rgaeAttributeTableMesh = NULL;
  1293. ; 151  :     DWORD *rgdwAttr = NULL;
  1294. ; 152  :     PBYTE pbFaceIndices = NULL;
  1295. ; 153  :     PBYTE pbLineIndices = NULL;
  1296. ; 154  :     PBYTE pbSrc;
  1297. ; 155  :     PBYTE pbDest;
  1298. ; 156  :     DWORD iLineOffset;
  1299. ; 157  :     DWORD iAttr;
  1300. ; 158  :     DWORD dwNeighbor;
  1301. ; 159  :     DWORD iFaceEnd;
  1302. ; 160  :     BOOL bCrease;
  1303. ; 161  :     DWORD cFacesCur;
  1304. ; 162  :     D3DCAPS9 Caps;
  1305. ; 163  :     PBYTE pbFaceIndicesCur;
  1306. ; 164  :     PBYTE pbLineIndicesCur;
  1307. ; 165  :     DWORD cNPatchFacesPerFace;
  1308. ; 166  : 
  1309. ; 167  :     // is the mesh 16 bit?
  1310. ; 168  :     b16BitIndex = !(ptmMesh->GetOptions() & D3DXMESH_32BIT);
  1311.  
  1312.   0000d    8b 75 08     mov     esi, DWORD PTR _ptmMesh$[ebp]
  1313.   00010    8b 06         mov     eax, DWORD PTR [esi]
  1314.   00012    57         push     edi
  1315.   00013    33 ff         xor     edi, edi
  1316.   00015    56         push     esi
  1317.   00016    8b d9         mov     ebx, ecx
  1318.   00018    89 7d ec     mov     DWORD PTR _rgaeAttributeTableMesh$[ebp], edi
  1319.   0001b    89 7d d8     mov     DWORD PTR _pbFaceIndices$[ebp], edi
  1320.   0001e    89 7d dc     mov     DWORD PTR _pbLineIndices$[ebp], edi
  1321.   00021    ff 50 24     call     DWORD PTR [eax+36]
  1322.   00024    f7 d0         not     eax
  1323.   00026    83 e0 01     and     eax, 1
  1324.   00029    89 45 e0     mov     DWORD PTR _b16BitIndex$[ebp], eax
  1325.  
  1326. ; 169  :     cBytesPerIndex = (b16BitIndex ? 2:4);
  1327.  
  1328.   0002c    57         push     edi
  1329.   0002d    58         pop     eax
  1330.   0002e    0f 94 c0     sete     al
  1331.  
  1332. ; 170  : 
  1333. ; 171  :     // get the number of faces
  1334. ; 172  :     cFaces = ptmMesh->GetNumFaces();
  1335.  
  1336.   00031    56         push     esi
  1337.   00032    8d 44 00 02     lea     eax, DWORD PTR [eax+eax+2]
  1338.   00036    89 45 e4     mov     DWORD PTR _cBytesPerIndex$[ebp], eax
  1339.   00039    8b 06         mov     eax, DWORD PTR [esi]
  1340.   0003b    ff 50 10     call     DWORD PTR [eax+16]
  1341.  
  1342. ; 173  : 
  1343. ; 174  :     hr = CreateEmptyOutline();
  1344.  
  1345.   0003e    8b cb         mov     ecx, ebx
  1346.   00040    89 45 f0     mov     DWORD PTR _cFaces$[ebp], eax
  1347.   00043    e8 00 00 00 00     call     ?CreateEmptyOutline@CNPatchOutline@@QAEJXZ ; CNPatchOutline::CreateEmptyOutline
  1348.  
  1349. ; 175  :     if (FAILED(hr))
  1350.  
  1351.   00048    3b c7         cmp     eax, edi
  1352.   0004a    89 45 fc     mov     DWORD PTR _hr$[ebp], eax
  1353.   0004d    0f 8c 60 02 00
  1354.     00         jl     $e_Exit$56310
  1355.  
  1356. ; 176  :         goto e_Exit;
  1357. ; 177  : 
  1358. ; 178  :     ptmMesh->GetDeclaration(m_pDecl);
  1359.  
  1360.   00053    8b 0e         mov     ecx, DWORD PTR [esi]
  1361.   00055    8d 43 0c     lea     eax, DWORD PTR [ebx+12]
  1362.   00058    50         push     eax
  1363.   00059    56         push     esi
  1364.   0005a    ff 51 1c     call     DWORD PTR [ecx+28]
  1365.  
  1366. ; 179  :     m_cBytesPerVertex = D3DXGetDeclVertexSize(m_pDecl, 0);
  1367.  
  1368.   0005d    57         push     edi
  1369.   0005e    8d 43 0c     lea     eax, DWORD PTR [ebx+12]
  1370.   00061    50         push     eax
  1371.   00062    e8 00 00 00 00     call     _D3DXGetDeclVertexSize@8
  1372.  
  1373. ; 180  : 
  1374. ; 181  :     ptmMesh->GetDevice(&m_pDevice);
  1375.  
  1376.   00067    53         push     ebx
  1377.   00068    89 83 14 02 00
  1378.     00         mov     DWORD PTR [ebx+532], eax
  1379.   0006e    8b 06         mov     eax, DWORD PTR [esi]
  1380.   00070    56         push     esi
  1381.   00071    ff 50 28     call     DWORD PTR [eax+40]
  1382.  
  1383. ; 182  : 
  1384. ; 183  :     hr = m_pDevice->CreateVertexDeclaration(m_pDecl, &m_pDeclObj);
  1385.  
  1386.   00074    8b 03         mov     eax, DWORD PTR [ebx]
  1387.   00076    8b 10         mov     edx, DWORD PTR [eax]
  1388.   00078    8d 4b 08     lea     ecx, DWORD PTR [ebx+8]
  1389.   0007b    51         push     ecx
  1390.   0007c    8d 4b 0c     lea     ecx, DWORD PTR [ebx+12]
  1391.   0007f    51         push     ecx
  1392.   00080    50         push     eax
  1393.   00081    ff 92 58 01 00
  1394.     00         call     DWORD PTR [edx+344]
  1395.  
  1396. ; 184  :     if (FAILED(hr))
  1397.  
  1398.   00087    3b c7         cmp     eax, edi
  1399.   00089    89 45 fc     mov     DWORD PTR _hr$[ebp], eax
  1400.   0008c    0f 8c 21 02 00
  1401.     00         jl     $e_Exit$56310
  1402.  
  1403. ; 185  :         goto e_Exit;
  1404. ; 186  : 
  1405. ; 187  : 
  1406. ; 188  :     hr = ptmMesh->GetAttributeTable(NULL, &m_caeAttributeTable);
  1407.  
  1408.   00092    8b 0e         mov     ecx, DWORD PTR [esi]
  1409.   00094    8d 83 20 02 00
  1410.     00         lea     eax, DWORD PTR [ebx+544]
  1411.   0009a    50         push     eax
  1412.   0009b    57         push     edi
  1413.   0009c    56         push     esi
  1414.   0009d    ff 51 4c     call     DWORD PTR [ecx+76]
  1415.  
  1416. ; 189  :     if (FAILED(hr))
  1417.  
  1418.   000a0    3b c7         cmp     eax, edi
  1419.   000a2    89 45 fc     mov     DWORD PTR _hr$[ebp], eax
  1420.   000a5    0f 8c 08 02 00
  1421.     00         jl     $e_Exit$56310
  1422.  
  1423. ; 190  :         goto e_Exit;
  1424. ; 191  : 
  1425. ; 192  :     // check for no attribute table and/or no adjacency
  1426. ; 193  :     if (m_caeAttributeTable == 0) 
  1427.  
  1428.   000ab    8b 83 20 02 00
  1429.     00         mov     eax, DWORD PTR [ebx+544]
  1430.   000b1    3b c7         cmp     eax, edi
  1431.   000b3    0f 84 fa 01 00
  1432.     00         je     $e_Exit$56310
  1433.  
  1434. ; 194  :     {
  1435. ; 195  :         // not attribute sorted!  just return for now
  1436. ; 196  :         goto e_Exit;
  1437. ; 197  :     }
  1438. ; 198  : 
  1439. ; 199  :     rgaeAttributeTableMesh = new D3DXATTRIBUTERANGE[m_caeAttributeTable];
  1440.  
  1441.   000b9    8d 04 80     lea     eax, DWORD PTR [eax+eax*4]
  1442.   000bc    c1 e0 02     shl     eax, 2
  1443.   000bf    50         push     eax
  1444.   000c0    e8 00 00 00 00     call     ??2@YAPAXI@Z        ; operator new
  1445.   000c5    89 45 ec     mov     DWORD PTR _rgaeAttributeTableMesh$[ebp], eax
  1446.  
  1447. ; 200  :     m_rgaeAttributeTable = new D3DXATTRIBUTERANGE[m_caeAttributeTable];
  1448.  
  1449.   000c8    8b 83 20 02 00
  1450.     00         mov     eax, DWORD PTR [ebx+544]
  1451.   000ce    8d 04 80     lea     eax, DWORD PTR [eax+eax*4]
  1452.   000d1    c1 e0 02     shl     eax, 2
  1453.   000d4    50         push     eax
  1454.   000d5    e8 00 00 00 00     call     ??2@YAPAXI@Z        ; operator new
  1455.  
  1456. ; 201  :     if ((rgaeAttributeTableMesh == NULL) || (rgaeAttributeTableMesh == NULL))
  1457.  
  1458.   000da    39 7d ec     cmp     DWORD PTR _rgaeAttributeTableMesh$[ebp], edi
  1459.   000dd    59         pop     ecx
  1460.   000de    59         pop     ecx
  1461.   000df    89 83 1c 02 00
  1462.     00         mov     DWORD PTR [ebx+540], eax
  1463.   000e5    0f 84 c1 01 00
  1464.     00         je     $L56325
  1465.  
  1466. ; 204  :         goto e_Exit;
  1467. ; 205  :     }
  1468. ; 206  : 
  1469. ; 207  :     CalculateCounts(cTesselateSegments, &cNPatchFacesPerFace);
  1470.  
  1471.   000eb    8b 45 0c     mov     eax, DWORD PTR _cTesselateSegments$[ebp]
  1472.   000ee    33 d2         xor     edx, edx
  1473.   000f0    42         inc     edx
  1474.   000f1    8d 48 ff     lea     ecx, DWORD PTR [eax-1]
  1475.   000f4    3b cf         cmp     ecx, edi
  1476.   000f6    89 55 e8     mov     DWORD PTR _cFacesOut$56540[ebp], edx
  1477.   000f9    76 0d         jbe     SHORT $L56543
  1478.   000fb    89 4d f4     mov     DWORD PTR tv261[ebp], ecx
  1479. $L56541:
  1480.   000fe    42         inc     edx
  1481.   000ff    42         inc     edx
  1482.   00100    01 55 e8     add     DWORD PTR _cFacesOut$56540[ebp], edx
  1483.   00103    ff 4d f4     dec     DWORD PTR tv261[ebp]
  1484.   00106    75 f6         jne     SHORT $L56541
  1485. $L56543:
  1486.  
  1487. ; 208  :     m_cLinesPerOrigFace = cTesselateSegments * 3;
  1488.  
  1489.   00108    8d 04 40     lea     eax, DWORD PTR [eax+eax*2]
  1490.   0010b    89 83 18 02 00
  1491.     00         mov     DWORD PTR [ebx+536], eax
  1492.  
  1493. ; 209  : 
  1494. ; 210  :     // should be the same number of new faces in relation to the old
  1495. ; 211  :     GXASSERT((cFaces % cNPatchFacesPerFace) == 0);
  1496. ; 212  :     cOrigFaces = cFaces / cNPatchFacesPerFace;
  1497.  
  1498.   00111    8b 45 f0     mov     eax, DWORD PTR _cFaces$[ebp]
  1499.   00114    33 d2         xor     edx, edx
  1500.   00116    f7 75 e8     div     DWORD PTR _cFacesOut$56540[ebp]
  1501.  
  1502. ; 213  : 
  1503. ; 214  :     hr = ptmMesh->GetAttributeTable(rgaeAttributeTableMesh, NULL);
  1504.  
  1505.   00119    57         push     edi
  1506.   0011a    ff 75 ec     push     DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1507.   0011d    56         push     esi
  1508.   0011e    89 45 f0     mov     DWORD PTR _cOrigFaces$[ebp], eax
  1509.   00121    8b 06         mov     eax, DWORD PTR [esi]
  1510.   00123    ff 50 4c     call     DWORD PTR [eax+76]
  1511.  
  1512. ; 215  :     if (FAILED(hr))
  1513.  
  1514.   00126    3b c7         cmp     eax, edi
  1515.   00128    89 45 fc     mov     DWORD PTR _hr$[ebp], eax
  1516.   0012b    0f 8c 82 01 00
  1517.     00         jl     $e_Exit$56310
  1518.  
  1519. ; 216  :         goto e_Exit;
  1520. ; 217  : 
  1521. ; 218  :     ptmMesh->LockIndexBuffer(D3DLOCK_READONLY, (LPVOID*)&pbFaceIndices);
  1522.  
  1523.   00131    8b 06         mov     eax, DWORD PTR [esi]
  1524.   00133    8d 4d d8     lea     ecx, DWORD PTR _pbFaceIndices$[ebp]
  1525.   00136    51         push     ecx
  1526.   00137    6a 10         push     16            ; 00000010H
  1527.   00139    56         push     esi
  1528.   0013a    ff 50 44     call     DWORD PTR [eax+68]
  1529.  
  1530. ; 219  : 
  1531. ; 220  :     // now initialize the edge attribute table
  1532. ; 221  :     cFacesCur = 0;
  1533. ; 222  :     for (iAttr = 0; iAttr < m_caeAttributeTable; iAttr++)
  1534.  
  1535.   0013d    39 bb 20 02 00
  1536.     00         cmp     DWORD PTR [ebx+544], edi
  1537.   00143    89 7d f4     mov     DWORD PTR _cFacesCur$[ebp], edi
  1538.   00146    89 7d fc     mov     DWORD PTR _iAttr$[ebp], edi
  1539.   00149    76 6e         jbe     SHORT $L56335
  1540.   0014b    8b 83 1c 02 00
  1541.     00         mov     eax, DWORD PTR [ebx+540]
  1542.   00151    33 d2         xor     edx, edx
  1543.   00153    89 55 f8     mov     DWORD PTR tv588[ebp], edx
  1544.   00156    eb 03         jmp     SHORT $L56333
  1545. $L56550:
  1546.  
  1547. ; 216  :         goto e_Exit;
  1548. ; 217  : 
  1549. ; 218  :     ptmMesh->LockIndexBuffer(D3DLOCK_READONLY, (LPVOID*)&pbFaceIndices);
  1550.  
  1551.   00158    8b 55 f8     mov     edx, DWORD PTR tv588[ebp]
  1552. $L56333:
  1553.  
  1554. ; 223  :     {
  1555. ; 224  :         m_rgaeAttributeTable[iAttr] = rgaeAttributeTableMesh[iAttr];
  1556.  
  1557.   0015b    8b 4d ec     mov     ecx, DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1558.   0015e    8d 34 0a     lea     esi, DWORD PTR [edx+ecx]
  1559.   00161    8d 3c 02     lea     edi, DWORD PTR [edx+eax]
  1560.   00164    6a 05         push     5
  1561.   00166    59         pop     ecx
  1562.   00167    f3 a5         rep movsd
  1563.  
  1564. ; 225  : 
  1565. ; 226  :         // 3 * Segments primitives per original triangle - original triangle = NewFaces / NumNewFacesPerOld
  1566. ; 227  :         m_rgaeAttributeTable[iAttr].FaceCount = (m_rgaeAttributeTable[iAttr].FaceCount / cNPatchFacesPerFace) * cTesselateSegments * 3;
  1567.  
  1568.   00169    8b 83 1c 02 00
  1569.     00         mov     eax, DWORD PTR [ebx+540]
  1570.   0016f    8d 4c 02 08     lea     ecx, DWORD PTR [edx+eax+8]
  1571.   00173    8b 01         mov     eax, DWORD PTR [ecx]
  1572.   00175    33 d2         xor     edx, edx
  1573.   00177    f7 75 e8     div     DWORD PTR _cFacesOut$56540[ebp]
  1574.  
  1575. ; 228  : 
  1576. ; 229  :         // setup the correct face start
  1577. ; 230  :         m_rgaeAttributeTable[iAttr].FaceStart = cFacesCur;
  1578.  
  1579.   0017a    8b 55 f8     mov     edx, DWORD PTR tv588[ebp]
  1580.   0017d    83 c2 14     add     edx, 20            ; 00000014H
  1581.   00180    89 55 f8     mov     DWORD PTR tv588[ebp], edx
  1582.   00183    0f af 45 0c     imul     eax, DWORD PTR _cTesselateSegments$[ebp]
  1583.   00187    8d 04 40     lea     eax, DWORD PTR [eax+eax*2]
  1584.   0018a    89 01         mov     DWORD PTR [ecx], eax
  1585.   0018c    8b 4d f4     mov     ecx, DWORD PTR _cFacesCur$[ebp]
  1586.   0018f    8b 83 1c 02 00
  1587.     00         mov     eax, DWORD PTR [ebx+540]
  1588.   00195    89 4c 02 f0     mov     DWORD PTR [edx+eax-16], ecx
  1589.  
  1590. ; 231  :         cFacesCur += m_rgaeAttributeTable[iAttr].FaceCount;
  1591.  
  1592.   00199    8b 83 1c 02 00
  1593.     00         mov     eax, DWORD PTR [ebx+540]
  1594.   0019f    03 4c 02 f4     add     ecx, DWORD PTR [edx+eax-12]
  1595.   001a3    ff 45 fc     inc     DWORD PTR _iAttr$[ebp]
  1596.   001a6    89 4d f4     mov     DWORD PTR _cFacesCur$[ebp], ecx
  1597.   001a9    8b 4d fc     mov     ecx, DWORD PTR _iAttr$[ebp]
  1598.   001ac    3b 8b 20 02 00
  1599.     00         cmp     ecx, DWORD PTR [ebx+544]
  1600.   001b2    72 a4         jb     SHORT $L56550
  1601.   001b4    8b 75 08     mov     esi, DWORD PTR _ptmMesh$[ebp]
  1602.   001b7    33 ff         xor     edi, edi
  1603. $L56335:
  1604.  
  1605. ; 232  :     }
  1606. ; 233  : 
  1607. ; 234  :     m_pDevice->GetDeviceCaps(&Caps);
  1608.  
  1609.   001b9    8b 03         mov     eax, DWORD PTR [ebx]
  1610.   001bb    8b 08         mov     ecx, DWORD PTR [eax]
  1611.   001bd    8d 95 a8 fe ff
  1612.     ff         lea     edx, DWORD PTR _Caps$[ebp]
  1613.   001c3    52         push     edx
  1614.   001c4    50         push     eax
  1615.   001c5    ff 51 1c     call     DWORD PTR [ecx+28]
  1616.  
  1617. ; 235  : 
  1618. ; 236  :     // if there are too many vertices, or the max vertex index is below 16bit (means no 32 bit support)
  1619. ; 237  :     //    then we need to emulate
  1620. ; 238  :     if (!b16BitIndex && ((Caps.MaxVertexIndex < ptmMesh->GetNumVertices()) || (Caps.MaxVertexIndex <= 0xffff) || (Caps.MaxPrimitiveCount < cFacesCur)))
  1621.  
  1622.   001c8    39 7d e0     cmp     DWORD PTR _b16BitIndex$[ebp], edi
  1623.   001cb    75 31         jne     SHORT $L56554
  1624.   001cd    8b 06         mov     eax, DWORD PTR [esi]
  1625.   001cf    56         push     esi
  1626.   001d0    ff 50 14     call     DWORD PTR [eax+20]
  1627.   001d3    39 85 60 ff ff
  1628.     ff         cmp     DWORD PTR _Caps$[ebp+184], eax
  1629.   001d9    72 17         jb     SHORT $L56337
  1630.   001db    81 bd 60 ff ff
  1631.     ff ff ff 00 00     cmp     DWORD PTR _Caps$[ebp+184], 65535 ; 0000ffffH
  1632.   001e5    76 0b         jbe     SHORT $L56337
  1633.   001e7    8b 45 f4     mov     eax, DWORD PTR _cFacesCur$[ebp]
  1634.   001ea    39 85 5c ff ff
  1635.     ff         cmp     DWORD PTR _Caps$[ebp+180], eax
  1636.   001f0    73 0c         jae     SHORT $L56554
  1637. $L56337:
  1638.  
  1639. ; 239  :     {
  1640. ; 240  :         m_bEmulate32BitIndex = TRUE;
  1641.  
  1642.   001f2    c7 83 24 02 00
  1643.     00 01 00 00 00     mov     DWORD PTR [ebx+548], 1
  1644.  
  1645. ; 241  :     }
  1646. ; 242  :     else
  1647.  
  1648.   001fc    eb 06         jmp     SHORT $L56338
  1649. $L56554:
  1650.  
  1651. ; 243  :     {
  1652. ; 244  :         m_bEmulate32BitIndex = FALSE;
  1653.  
  1654.   001fe    89 bb 24 02 00
  1655.     00         mov     DWORD PTR [ebx+548], edi
  1656. $L56338:
  1657.  
  1658. ; 245  :     }
  1659. ; 246  : 
  1660. ; 247  :     hr = m_pDevice->CreateIndexBuffer(cOrigFaces * 3 * cTesselateSegments * 2 * cBytesPerIndex, D3DUSAGE_SOFTWAREPROCESSING, 
  1661. ; 248  :                                         (b16BitIndex ? D3DFMT_INDEX16:D3DFMT_INDEX32),
  1662. ; 249  :                                         D3DPOOL_MANAGED, &m_pIndexBuffer, NULL);
  1663.  
  1664.   00204    57         push     edi
  1665.   00205    8d 43 04     lea     eax, DWORD PTR [ebx+4]
  1666.   00208    50         push     eax
  1667.   00209    8b 45 e0     mov     eax, DWORD PTR _b16BitIndex$[ebp]
  1668.   0020c    f7 d8         neg     eax
  1669.   0020e    1b c0         sbb     eax, eax
  1670.   00210    83 c0 66     add     eax, 102        ; 00000066H
  1671.   00213    6a 01         push     1
  1672.   00215    50         push     eax
  1673.   00216    8b 45 f0     mov     eax, DWORD PTR _cOrigFaces$[ebp]
  1674.   00219    0f af 45 e4     imul     eax, DWORD PTR _cBytesPerIndex$[ebp]
  1675.   0021d    0f af 45 0c     imul     eax, DWORD PTR _cTesselateSegments$[ebp]
  1676.   00221    8b 0b         mov     ecx, DWORD PTR [ebx]
  1677.   00223    8b 11         mov     edx, DWORD PTR [ecx]
  1678.   00225    8d 04 40     lea     eax, DWORD PTR [eax+eax*2]
  1679.   00228    6a 10         push     16            ; 00000010H
  1680.   0022a    d1 e0         shl     eax, 1
  1681.   0022c    50         push     eax
  1682.   0022d    51         push     ecx
  1683.   0022e    ff 52 6c     call     DWORD PTR [edx+108]
  1684.  
  1685. ; 250  :     if (FAILED(hr))
  1686.  
  1687.   00231    33 ff         xor     edi, edi
  1688.   00233    3b c7         cmp     eax, edi
  1689.   00235    89 45 fc     mov     DWORD PTR _hr$[ebp], eax
  1690.   00238    7c 79         jl     SHORT $e_Exit$56310
  1691.  
  1692. ; 251  :         goto e_Exit;
  1693. ; 252  : 
  1694. ; 253  :     m_pIndexBuffer->Lock(0, 0, (PVOID*)&pbLineIndices, D3DLOCK_NOSYSLOCK);
  1695.  
  1696.   0023a    8b 43 04     mov     eax, DWORD PTR [ebx+4]
  1697.   0023d    8b 08         mov     ecx, DWORD PTR [eax]
  1698.   0023f    68 00 08 00 00     push     2048            ; 00000800H
  1699.   00244    8d 55 dc     lea     edx, DWORD PTR _pbLineIndices$[ebp]
  1700.   00247    52         push     edx
  1701.   00248    57         push     edi
  1702.   00249    57         push     edi
  1703.   0024a    50         push     eax
  1704.   0024b    ff 51 2c     call     DWORD PTR [ecx+44]
  1705.  
  1706. ; 254  : 
  1707. ; 255  : 
  1708. ; 256  :     // next go through and fill the index buffer
  1709. ; 257  :     pbFaceIndicesCur = pbFaceIndices;
  1710.  
  1711.   0024e    8b 45 d8     mov     eax, DWORD PTR _pbFaceIndices$[ebp]
  1712.  
  1713. ; 258  :     pbLineIndicesCur = pbLineIndices;
  1714. ; 259  :     for (iOrigFace = 0; iOrigFace < cOrigFaces; iOrigFace++)
  1715.  
  1716.   00251    8b 55 f0     mov     edx, DWORD PTR _cOrigFaces$[ebp]
  1717.   00254    3b d7         cmp     edx, edi
  1718.   00256    89 45 08     mov     DWORD PTR _pbFaceIndicesCur$[ebp], eax
  1719.   00259    8b 45 dc     mov     eax, DWORD PTR _pbLineIndices$[ebp]
  1720.   0025c    89 45 f8     mov     DWORD PTR _pbLineIndicesCur$[ebp], eax
  1721.   0025f    76 52         jbe     SHORT $e_Exit$56310
  1722.   00261    8b 45 e4     mov     eax, DWORD PTR _cBytesPerIndex$[ebp]
  1723.   00264    8b 4d e8     mov     ecx, DWORD PTR _cFacesOut$56540[ebp]
  1724.   00267    0f af c8     imul     ecx, eax
  1725.   0026a    0f af 45 0c     imul     eax, DWORD PTR _cTesselateSegments$[ebp]
  1726.   0026e    8d 0c 49     lea     ecx, DWORD PTR [ecx+ecx*2]
  1727.   00271    8d 3c 40     lea     edi, DWORD PTR [eax+eax*2]
  1728.   00274    89 4d f0     mov     DWORD PTR tv579[ebp], ecx
  1729.   00277    d1 e7         shl     edi, 1
  1730.   00279    89 55 e4     mov     DWORD PTR tv323[ebp], edx
  1731. $L56552:
  1732.  
  1733. ; 260  :     {
  1734. ; 261  :         if (b16BitIndex)
  1735.  
  1736.   0027c    83 7d e0 00     cmp     DWORD PTR _b16BitIndex$[ebp], 0
  1737.  
  1738. ; 262  :         {
  1739. ; 263  :             AddOutlineLineSegments<UINT16>((UINT16*)pbFaceIndicesCur, cTesselateSegments, (UINT16*)pbLineIndicesCur);
  1740.  
  1741.   00280    ff 75 f8     push     DWORD PTR _pbLineIndicesCur$[ebp]
  1742.   00283    ff 75 0c     push     DWORD PTR _cTesselateSegments$[ebp]
  1743.   00286    ff 75 08     push     DWORD PTR _pbFaceIndicesCur$[ebp]
  1744.   00289    74 07         je     SHORT $L56346
  1745.   0028b    e8 00 00 00 00     call     ??$AddOutlineLineSegments@G@@YAXPAGK0@Z ; AddOutlineLineSegments<unsigned short>
  1746.  
  1747. ; 264  :         }
  1748. ; 265  :         else
  1749.  
  1750.   00290    eb 05         jmp     SHORT $L56555
  1751. $L56346:
  1752.  
  1753. ; 266  :         {
  1754. ; 267  :             AddOutlineLineSegments<UINT32>((UINT32*)pbFaceIndicesCur, cTesselateSegments, (UINT32*)pbLineIndicesCur);
  1755.  
  1756.   00292    e8 00 00 00 00     call     ??$AddOutlineLineSegments@I@@YAXPAIK0@Z ; AddOutlineLineSegments<unsigned int>
  1757. $L56555:
  1758.  
  1759. ; 268  :         }
  1760. ; 269  : 
  1761. ; 270  :         pbFaceIndicesCur += cBytesPerIndex * 3 * cNPatchFacesPerFace;
  1762.  
  1763.   00297    8b 45 f0     mov     eax, DWORD PTR tv579[ebp]
  1764.   0029a    01 45 08     add     DWORD PTR _pbFaceIndicesCur$[ebp], eax
  1765.  
  1766. ; 271  :         pbLineIndicesCur += cBytesPerIndex * 2 * 3 * cTesselateSegments;
  1767.  
  1768.   0029d    01 7d f8     add     DWORD PTR _pbLineIndicesCur$[ebp], edi
  1769.   002a0    83 c4 0c     add     esp, 12            ; 0000000cH
  1770.   002a3    ff 4d e4     dec     DWORD PTR tv323[ebp]
  1771.   002a6    75 d4         jne     SHORT $L56552
  1772.  
  1773. ; 272  :     }
  1774.  
  1775.   002a8    33 ff         xor     edi, edi
  1776.   002aa    eb 07         jmp     SHORT $e_Exit$56310
  1777. $L56325:
  1778.  
  1779. ; 202  :     {
  1780. ; 203  :         hr = E_OUTOFMEMORY;
  1781.  
  1782.   002ac    c7 45 fc 0e 00
  1783.     07 80         mov     DWORD PTR _hr$[ebp], -2147024882 ; 8007000eH
  1784. $e_Exit$56310:
  1785.  
  1786. ; 273  : 
  1787. ; 274  : e_Exit:
  1788. ; 275  :     delete []rgaeAttributeTableMesh;
  1789.  
  1790.   002b3    ff 75 ec     push     DWORD PTR _rgaeAttributeTableMesh$[ebp]
  1791.   002b6    e8 00 00 00 00     call     ??3@YAXPAX@Z        ; operator delete
  1792.  
  1793. ; 276  :     delete []rgdwAttr;
  1794.  
  1795.   002bb    57         push     edi
  1796.   002bc    e8 00 00 00 00     call     ??3@YAXPAX@Z        ; operator delete
  1797.  
  1798. ; 277  : 
  1799. ; 278  :     if (pbFaceIndices != NULL)
  1800.  
  1801.   002c1    39 7d d8     cmp     DWORD PTR _pbFaceIndices$[ebp], edi
  1802.   002c4    59         pop     ecx
  1803.   002c5    59         pop     ecx
  1804.   002c6    74 06         je     SHORT $L56366
  1805.  
  1806. ; 279  :         ptmMesh->UnlockIndexBuffer();
  1807.  
  1808.   002c8    8b 06         mov     eax, DWORD PTR [esi]
  1809.   002ca    56         push     esi
  1810.   002cb    ff 50 48     call     DWORD PTR [eax+72]
  1811. $L56366:
  1812.  
  1813. ; 280  : 
  1814. ; 281  :     if (pbLineIndices != NULL)
  1815.  
  1816.   002ce    39 7d dc     cmp     DWORD PTR _pbLineIndices$[ebp], edi
  1817.   002d1    74 09         je     SHORT $L56367
  1818.  
  1819. ; 282  :         m_pIndexBuffer->Unlock();
  1820.  
  1821.   002d3    8b 5b 04     mov     ebx, DWORD PTR [ebx+4]
  1822.   002d6    8b 03         mov     eax, DWORD PTR [ebx]
  1823.   002d8    53         push     ebx
  1824.   002d9    ff 50 30     call     DWORD PTR [eax+48]
  1825. $L56367:
  1826.  
  1827. ; 283  : 
  1828. ; 284  :     return hr;
  1829.  
  1830.   002dc    8b 45 fc     mov     eax, DWORD PTR _hr$[ebp]
  1831.   002df    5f         pop     edi
  1832.   002e0    5e         pop     esi
  1833.   002e1    5b         pop     ebx
  1834.  
  1835. ; 285  : }
  1836.  
  1837.   002e2    c9         leave
  1838.   002e3    c2 08 00     ret     8
  1839. ?Init@CNPatchOutline@@QAEJPAUID3DXBaseMesh@@K@Z ENDP    ; CNPatchOutline::Init
  1840. _TEXT    ENDS
  1841. END
  1842.